import styles from "./index.module.scss";
import { useDispatch, useSelector } from "react-redux";
import { setLayers } from "@/store";

export default function Invoicing() {
  const dispatch = useDispatch();
  const layers = useSelector((state) => {
    return state.layers;
  });
  const openModel = (name) => {
    dispatch(
      setLayers({
        query: {},
        name,
        other: {},
      })
    );
    console.log(layers);
  };
  return (
    <>
      <div className="content">
        <div className="content-item w-50 ">
          <div className="content-val text-overflow">25,627</div>
          <div className="content-title">计划开票</div>
        </div>
        <div className="content-item w-50" onClick={() => openModel("model4")}>
          <div className="content-val text-overflow text-stroke-blue">
            25,627
          </div>
          <div className="content-title">实际开票</div>
        </div>
        <div className="content-item ">
          <div className="content-val text-overflow">25,627</div>
          <div className="content-title">待开票</div>
        </div>
        <div className="content-item ">
          <div className="content-val text-overflow">25,627</div>
          <div className="content-title">未收金额</div>
        </div>
        <div className="content-item ">
          <div className="content-val text-overflow">25,627</div>
          <div className="content-title">待验金额</div>
        </div>
      </div>
    </>
  );
}
